document.addEventListener("DOMContentLoaded",function(e){var n=window.location.search.slice(1).split("&").map(function(e){for(var n=e.split("=");n.length<2;)n.push("");return[n[0],e=n.slice(1).join("=")]}).reduce(function(e,n){var t=n.map(decodeURIComponent),o=t[0],a=t[1],i=o in e;return i&&"string"==typeof e[o]?e[o]=[e[o],a]:i?e[o].push(a):e[o]=a,e},{}),t="";for(var o in n)o&&(t+=(t?",":"")+'.op3-element [data-op-url-mapping="'+o+'"]:not(:disabled):not(input:read-only)');t&&document.querySelectorAll(t).forEach(function(e){var t=e.getAttribute("data-op-url-mapping"),o=n[t];e.matches("select")?e.querySelector('option[value="'+o+'"]')&&(e.value=o):e.matches('input[type="checkbox"],input[type="radio"]')?e.checked=-1===["false","unchecked","none","0",""].indexOf(o):e.value=o})});!function(e,t){"use strict";var o=function(){if(!(this instanceof o))throw"OP3_Cookie: OP3_Cookie is a constructor."};o.prototype={_defaults:{expires:null,"max-age":null,domain:null,path:"/",secure:null,samesite:null},_encodeKey:function(e){return e.replace(/[^\x10-\x7E]+/g,"").replace(/[\x20\(\)<>@,;:\\"\/\[\]\?={}]+/g,"")},_encodeValue:function(e){return encodeURIComponent(e)},_decodeValue:function(e){return decodeURIComponent(e)},get:function(e){var t=this.toObject();return e in t?t[e]:null},set:function(e,o,i){if(void 0!==e&&""!==e){if(e=this._encodeKey(e),o=this._encodeValue(o),!e||!o)throw"OP3.Cookie: key/value arguments are mandatory.";for(var n in i=i||{}){var r=i[n];delete i[n],i[n.toLowerCase()]=r}for(var n in this._defaults)n in i||(i[n]=this._defaults[n]);if(i.expires){if(!isNaN(1*i.expires)){var s=new Date;s.setTime(s.getTime()+24*i.expires*60*60*1e3),i.expires=s}i.expires instanceof Date&&(i.expires=i.expires.toUTCString())}var a="";for(var n in i)null!==i[n]&&!1!==i[n]&&(a+=";"+n,!0!==i[n]&&(a+="="+i[n]));t.cookie=e+"="+o+a}},del:function(e){this.set(e,"0",{expires:-1})},toObject:function(){var e={};return(t.cookie?t.cookie.split("; "):[]).forEach(function(t){var o=t.split("="),i=o[0],n=o.slice(1).join("=");n=(n=this._decodeValue(n)).replace(/^"(.*)"$/,"$1"),e[i]=n}.bind(this)),e}},o.prototype.constructor=o,e.OP3=e.OP3||{},e.OP3.Cookie=new o}(window,document);!function(e,t){"use strict";var n=function(t){if(!(this instanceof n))throw"OP3_PopOverlay: OP3_PopOverlay is a constructor.";if(t=t||e,"[object Window]"!==Object.prototype.toString.call(t))throw"OP3_PopOverlay: parent argument must be of type Window.";this._init(t)};n.prototype={constructor:n,_init:function(e){this._parent=e,this._wrapper=null,this._elements=null,this._current=null,this._boundHandleLoad=this._handleLoad.bind(this),this._boundHandleExitIntent=this._handleExitIntent.bind(this),this._boundHandleClick=this._handleClick.bind(this),this.parent.addEventListener("load",this._boundHandleLoad),this.parent.document.addEventListener("exitintent",this._boundHandleExitIntent),this.parent.document.body.addEventListener("click",this._boundHandleClick),this.refresh()},destroy:function(){this.clearElements(),this.parent.document.body.removeEventListener("click",this._boundHandleClick),this.parent.document.removeEventListener("exitintent",this._boundHandleExitIntent),this.parent.removeEventListener("load",this._boundHandleLoad),delete this._boundHandleClick,delete this._boundHandleExitIntent,delete this._boundHandleLoad,delete this._current,delete this._elements,delete this._wrapper,delete this._parent},get parent(){return this._parent},set parent(e){if(this.parent!==e){if("[object Window]"!==Object.prototype.toString.call(e))throw"OP3_PopOverlay: parent property must be of type Window.";this.destroy(),this._init(e)}},get wrapper(){return this._wrapper||(this._wrapper=this.parent.document.querySelector("#op3-designer-element")),this._wrapper},get current(){return this._current},refresh:function(){this.clearElements(),this.wrapper&&this.wrapper.querySelectorAll('#op3-designer-element .op3-element[data-op3-element-type="popoverlay"]').forEach(function(e){this.addElement(e)}.bind(this))},clearElements:function(){this._elements&&Object.keys(this._elements).map(function(e){return this._elements[e]}.bind(this)).forEach(function(e){e.interval&&this.parent.clearInterval(e.interval)}.bind(this)),this._elements={}},addElement:function(e){var t=this._getElementConfig(e);if(t){var n=t.index;Object.keys(this._elements).map(function(e){return this._elements[e]}.bind(this)).filter(function(e){return e.index>=n}).forEach(function(e){e.index++}),this._elements[t.uuid]=t}},removeElement:function(e){var t=this._getElementConfig(e);if(t){var n=this.current,i=t.uuid,o=t.index,r=t.interval;n===i&&this.close(),r&&this.parent.clearInterval(r),delete this._elements[i],Object.keys(this._elements).map(function(e){return this._elements[e]}.bind(this)).filter(function(e){return e.index>=o}).forEach(function(e){e.index--})}},refreshElement:function(e){var t=this._getElementConfig(e);t&&(this._elements[t.uuid]=this._getElementConfig(e,!0))},getConfig:function(e){return e in this._elements?this._elements[e]:null},open:function(e,t){if(this.current)return this._call(t,null);var n=this._elements[e];if(!n)return this._call(t,null);this._modalShow(n,t)},close:function(e){var t=this.current;t?this._modalHide(this._elements[t],e):this._call(e,null)},_isDevice:!!(navigator.maxTouchPoints||"ontouchstart"in t.documentElement),_call:function(e){if("function"==typeof e){var t=Array.prototype.slice.call(arguments,1);e.apply(this,t)}},_trigger:function(e,t,n){var i=new CustomEvent("op3popoverlay"+t,n||{});return e.dispatchEvent(i),i},_getElementConfig:function(t,n){if(!n){var i=t.getAttribute("data-op3-uuid"),o=this.getConfig(i);if(o)return o}var r,a=t.querySelector(".op3-popoverlay-content"),s=t.querySelector(".op3-popoverlay-controls"),l=t.querySelectorAll('[data-op3-element-type="video"] iframe, [data-op3-element-type="video"] video'),d=t.querySelectorAll('[data-op3-element-type="soundcloud"] iframe'),c=Array.prototype.slice.call(this.wrapper.querySelectorAll('#op3-designer-element > [data-op3-children] > .op3-element[data-op3-element-type="popoverlay"]')).indexOf(t),p=(i=t.getAttribute("data-op3-uuid"),a.getAttribute("data-op3-text")),u=a.getAttribute("data-op-animation"),h=a.getAttribute("data-op-animation-trigger")||"none",v=!!(1*a.getAttribute("data-op3-use-on-devices")),m=0,f=1*a.getAttribute("data-op3-cookie-expires")||0;t.className=t.className.replace(/(^|\s)op3-popoverlay-effect-\S+/g," ").replace(/\s+/g," ").trim(),t.className+=(t.className?" ":"")+"op3-popoverlay-effect-"+u;var _=e.getComputedStyle(a);r=parseFloat(_.getPropertyValue("animation-duration"))||parseFloat(_.getPropertyValue("transition-duration"))||0;var g=a.getAttribute("data-op-timer")||"0sec";return g&&g.indexOf("sec")>-1?m=1e3*parseInt(g):g&&g.indexOf("min")>-1&&(m=1e3*parseInt(g)*60),{element:t,content:a,controls:s,videoElements:l,soundcloudElements:d,interval:null,index:c,uuid:i,name:p,animationStyle:u,animationDuration:r,triggerEvent:h,useOnDevices:v,delayTimer:m,cookieExpires:f}},_modalShow:function(e,t){var n=e.element,i=this.wrapper,o=function(i){i&&i.target!==e.content||(i&&(i.target.removeEventListener("transitionend",o),i.target.removeEventListener("animationend",o)),this._trigger(n,"open",{bubbles:!0,detail:{config:e}}),this._call(t,e))}.bind(this);this._current=e.uuid,i.classList.add("op3-popoverlay-active"),n.classList.remove("op3-popoverlay-hide"),n.classList.remove("op3-popoverlay-show"),n.style.display="block",n.offsetHeight,n.classList.add("op3-popoverlay-show"),e.animationDuration&&n.parentElement?(e.content.addEventListener("transitionend",o),e.content.addEventListener("animationend",o)):o(),this._videoStart(),this._soundcloudStart()},_modalHide:function(e,t){var n=e.element,i=this.wrapper,o=function(r){r&&r.target!==e.content||(r&&(r.target.removeEventListener("transitionend",o),r.target.removeEventListener("animationend",o)),this._current=null,i.classList.remove("op3-popoverlay-active"),n.classList.remove("op3-popoverlay-show"),n.style.display="none",this._trigger(n,"close",{bubbles:!0,detail:{config:e}}),this._call(t,e))}.bind(this);e.interval&&(this.parent.clearInterval(e.interval),e.interval=null),n.classList.remove("op3-popoverlay-show"),n.classList.add("op3-popoverlay-hide"),e.animationDuration&&n.parentElement?(e.content.addEventListener("transitionend",o),e.content.addEventListener("animationend",o)):o(),this._videoStop(),this._soundcloudStop()},_popup:function(e){var t="op3-popoverlay-"+OP3.Meta.pageId+"-"+e.uuid;OP3.Cookie.get(t)||(e.cookieExpires&&OP3.Cookie.set(t,"1",{expires:e.cookieExpires}),this.open(e.uuid))},_videoStart:function(){this.getConfig(this.current).videoElements.forEach(function(e){if(!e.matches("[data-embed-video-facade-src]")){var t=e.closest(".op3-video-wrapper"),n=e.getAttribute("src"),i=t.getAttribute("data-op3-src");if(!n&&i&&e.setAttribute("src",i),t.matches('[data-op3-video-autoplay="1"]')){var o=t.closest(".op3-element").querySelector(".op3-video-image-overlay");o&&(o.style.display="none")}}})},_videoStop:function(){this.getConfig(this.current).videoElements.forEach(function(e){if(!e.matches("[data-embed-video-facade-src]")){var t=e.closest(".op3-video-wrapper"),n=e.getAttribute("src"),i=t.getAttribute("data-op3-src");"embed"===t.getAttribute("data-op3-video-source")&&t.setAttribute("data-op3-src",n),i&&e.setAttribute("src","")}})},_soundcloudStart:function(){this.getConfig(this.current).soundcloudElements.forEach(function(e){var t=e.getAttribute("src"),n=e.getAttribute("data-op3-src");t&&e.setAttribute("data-op3-src",t),!t&&n&&e.setAttribute("src",n)})},_soundcloudStop:function(){this.getConfig(this.current).soundcloudElements.forEach(function(e){e.setAttribute("src","")})},_handleLoad:function(e){Object.keys(this._elements).map(function(e){return this._elements[e]}.bind(this)).filter(function(e){var t=e.triggerEvent;return"load"===t||"load_delay"===t||"exitintent"===t&&this._isDevice&&e.useOnDevices}.bind(this)).forEach(function(e){var t=e.triggerEvent,n=(e.useOnDevices,"exitintent"!==t?e.delayTimer:0);e.interval=this.parent.setTimeout(this._popup.bind(this,e),n)}.bind(this))},_handleExitIntent:function(e){Object.keys(this._elements).map(function(e){return this._elements[e]}.bind(this)).filter(function(e){return"exitintent"===e.triggerEvent&&!this._isDevice}.bind(this)).forEach(function(e){var t=e.triggerEvent,n=(e.useOnDevices,"exitintent"!==t?e.delayTimer:0);e.interval=this.parent.setTimeout(this._popup.bind(this,e),n)}.bind(this))},_handleClick:function(e){e.target.closest('[data-op3-action="popoverlay"],[data-op-action="popoverlay"]')&&this._handleClickOpen(e),e.target.closest('.op3-popoverlay-background,.op3-popoverlay-close,[data-op-action="closePopoverlay"]')&&this._handleClickClose(e)},_handleClickOpen:function(e){e.preventDefault();var t=e.target.closest('[data-op3-action="popoverlay"],[data-op-action="popoverlay"]'),n=t.getAttribute("data-op-popoverlay-trigger")||t.getAttribute("data-op3-popoverlay-trigger");this._elements[n]&&this.close(function(){this.open(n)}.bind(this))},_handleClickClose:function(e){e.preventDefault(),e.target.closest('[data-op3-element-type="popoverlay"]').getAttribute("data-op3-uuid")===this.current&&this.close()}},e.OP3=e.OP3||{},OP3.PopOverlay=new n}(window,document);document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('[data-op3-element-type="video"] .op3-video-magic-overlay .op3-video-magic-overlay-image');if(e.length>0)for(var t=0;t-1?1e3*(60*i+o):0,r=t.closest(".op3-element");r.setAttribute("data-op-animation-state","enter"),r.setAttribute("data-op-animation-style",t.getAttribute("data-op-animation-style")),r.setAttribute("data-op-timeout",n);var s=e.indexOf("load")>-1?"load":"scroll";a[s](r,n),"load"===e&&"1"===t.getAttribute("data-op-animation-loop")&&a.scroll(r,n)}}))});Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&t.nodeType===Node.ELEMENT_NODE);return null});!function(e,t){"use strict";if("function"!=typeof e.ResizeObserver){var n=function(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseInt(t.getPropertyValue("padding-top")),r=parseInt(t.getPropertyValue("padding-right")),i=parseInt(t.getPropertyValue("padding-bottom")),o=parseInt(t.getPropertyValue("padding-left")),a={x:o,y:n,width:e.clientWidth-o-r,height:e.clientHeight-n-i};for(var s in a.left=a.x,a.top=a.y,a.right=a.left+a.width,a.bottom=a.top+a.height,a)Object.defineProperty(this,s,{value:a[s],writable:!1,enumerable:!0,configurable:!1})};n.prototype={constructor:n};var r=function(e){Object.defineProperty(this,"target",{value:e,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(this,"contentRect",{value:new n(e),writable:!1,enumerable:!0,configurable:!1})};r.prototype={constructor:r};var i=function(e){if(!(this instanceof i))throw"Failed to construct 'ResizeObserver': Please use the 'new' operator, this DOM object constructor cannot be called as a function.";if(void 0===e)throw"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if("function"!=typeof e)throw"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.";this._callback=e,this._observables=[],this._boundIntervalHandler=this._intervalHandler.bind(this),this._interval=null};i.prototype={constructor:i,observe:function(e){if(!(e instanceof Element))throw"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.";if(!this._observables.some(function(t){return t.target===e})){var t=new r(e);this._observables.push(t)}this._interval||(this._interval=this._boundIntervalHandler())},unobserve:function(e){this._observables=this._observables.filter(function(t){return t.target!==e}),this._observables.length||this.disconnect()},disconnect:function(){e.clearInterval(this._interval),this._interval=null,this._observables=[]},_intervalHandler:function(){var t=this._observables,n=t.map(function(e,n){var i=new r(e.target);return e.contentRect.height===i.contentRect.height&&e.contentRect.width===i.contentRect.width?null:(t[n]=i,i)}).filter(function(e){return null!==e});return n.length>0&&this._callback(n),this._interval=e.requestAnimationFrame(this._boundIntervalHandler),this._interval}},e.ResizeObserver=i}}(window,document);!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=window.document,e=[],n=null,o=null;r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?a(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach(function(t){t._checkForIntersections()})}),n},r._resetCrossOriginUpdater=function(){n=null,o=null},r.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},r.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},r.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},r.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},r.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,i=null,r=null;if(this.POLL_INTERVAL?i=n.setInterval(o,this.POLL_INTERVAL):(s(n,"resize",o,!0),s(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(r=new n.MutationObserver(o)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),h(t,"resize",o,!0)),h(e,"scroll",o,!0),r&&r.disconnect()}),e!=(this.root&&this.root.ownerDocument||t)){var c=p(e);c&&this._monitorIntersections(c.ownerDocument)}}},r.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&this.root.ownerDocument||t;if(!this._observationTargets.some(function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=o;){var i=p(n);if((n=i&&i.ownerDocument)==e)return!0}return!1})){var i=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),i(),e!=o){var r=p(e);r&&this._unmonitorIntersections(r.ownerDocument)}}}},r.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&m>=0&&{top:u,bottom:l,left:p,right:d,width:g,height:m}||null),!v)break;_=_&&f(_)}return v}},r.prototype._getRootRect=function(){var e;if(this.root)e=c(this.root);else{var n=t.documentElement,o=t.body;e={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i0,(1===e&&!n||1===e&&i)&&this.animate()}},e});!function(t,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():t.RichTextAnimationDraw=i()}(this,function(){"use strict";var t=function(t,i){RichTextAnimationBase.apply(this,arguments)};return t.prototype=Object.assign(Object.create(RichTextAnimationBase.prototype),{DEFAULT_OPTIONS:{bringToFront:null,color:null,thickness:null,roundedEdges:null},DATA_ATTR:"draw",constructor:t,_initUi:function(t){RichTextAnimationBase.prototype._initUi.apply(this,arguments),this._ui.svg=this._ui.element.querySelector("svg"),this._ui.svg&&(this._ui.path=this._ui.svg.querySelectorAll("path"),this._ui.path.length)},_initStylesheet:function(){var t=this._ui.path?this._ui.path:null;if(t){RichTextAnimationBase.prototype._initStylesheet.apply(this,arguments);var i=this.selector();this._defineStylesheetRule(this._ui.svg,i+" svg"),t&&this._ui.path.forEach(function(t,e){t.setAttribute("data-rich-text-animation-path-index",e),this._defineStylesheetRule(t,i+' svg path[data-rich-text-animation-path-index="'+e+'"]');var n=t.getTotalLength();t.setAttribute("data-rich-text-animation-path-length",n),this._setElementStyle(t,"stroke-dashoffset",n),this._setElementStyle(t,"stroke-dasharray",n)}.bind(this))}},destroy:function(t){this._undefineStylesheetRule(this._ui.svg),this._ui.path.forEach(function(t){t.removeAttribute("data-rich-text-animation-path-length"),t.removeAttribute("data-rich-text-animation-path-index"),this._undefineStylesheetRule(t)}.bind(this)),RichTextAnimationBase.prototype.destroy.apply(this,arguments)},_backward:function(t){var i=this._ui.path&&this._ui.path[0]?this._ui.path[0]:null;if(i){var e=this._ui.window.getComputedStyle(i);if(e.getPropertyValue("stroke-dashoffset")===e.getPropertyValue("stroke-dasharray"))return"1"!==e.getPropertyValue("opacity")&&this._setElementStyle(this._ui.path,"opacity","1",!0),void this._callCallback(t);var n=this.getOption("transitionDuration")/this._ui.path.length;this._fadeOut(function(){this._setElementStyle(this._ui.path,"transition-duration","0ms"),this._setElementStyle(this._ui.path,"opacity","1"),this._setElementStyleFromAttr(this._ui.path,"stroke-dashoffset","data-rich-text-animation-path-length"),setTimeout(function(){this._setElementStyle(this._ui.path,"transition-duration",n+"ms"),this._callCallback(t)}.bind(this))}.bind(this))}},_forward:function(t){this._drawIn(function(){this._callCallback(t)}.bind(this))},_fadeIn:function(t){this._animatePathOpacity(!1,function(){this._callCallback(t)}.bind(this))},_fadeOut:function(t){this._animatePathOpacity(!0,function(){this._callCallback(t)}.bind(this))},_drawIn:function(t){this._animatePathStrokeDash(!1,function(){this._callCallback(t)}.bind(this))},_drawOut:function(t){this._animatePathStrokeDash(!0,function(){this._callCallback(t)}.bind(this))},_animatePathOpacity:function(t,i){var e=this._toArray(this._ui.path),n=t?"pop":"shift",a=function(s){if(s&&s.target.removeEventListener("transitionend",a),e.length){var h=e[n](),o=this._ui.window.getComputedStyle(h).getPropertyValue("opacity"),r=t?"0":"1";o+""!==r?(h.addEventListener("transitionend",a),this._setElementStyle(h,"opacity",r)):a()}else this._callCallback(i)}.bind(this);a()},_animatePathStrokeDash:function(t,i){var e=this._toArray(this._ui.path),n=t?"pop":"shift",a=function(s){if(s&&s.target.removeEventListener("transitionend",a),e.length){var h=e[n](),o=this._ui.window.getComputedStyle(h),r=o.getPropertyValue("stroke-dashoffset"),l=o.getPropertyValue("stroke-dasharray");(t?r!==l:0!==parseFloat(r))?(h.addEventListener("transitionend",a),this._setElementStyle(h,"stroke-dashoffset",t?h.getAttribute("data-rich-text-animation-path-length"):"0")):a()}else this._callCallback(i)}.bind(this);a()},_getDefaultOptions:function(){var t=RichTextAnimationBase.prototype._getDefaultOptions.apply(this,arguments),i=this._ui.path&&this._ui.path[0]?this._ui.path[0]:null;return null===t.bringToFront&&(t.bringToFront="-1"!==this._getElementStyle(this._ui.svg,"z-index")),null===t.roundedEdges&&(t.roundedEdges="round"===this._getElementStyle(i,"stroke-linecap")),null===t.color&&(t.color=this._getElementStyle(i,"stroke")),null===t.thickness&&(t.thickness=parseInt(this._getElementStyle(i,"stroke-width"))||1),t},_validateOption:function(t,i){var e=RichTextAnimationBase.prototype._validateOption.apply(this,arguments);return void 0!==e?e:(e=i,"bringToFront"===t||"roundedEdges"===t?e="true"===e||"false"!==e&&!!e:"color"===t&&"string"==typeof i||("thickness"===t?(e*=1,e=Math.min(e,10),e=Math.max(e,1)):e=void 0),e)},_triggerInit:function(t){var i=this._ui.svg;if(i){var e=i.parentElement;e.removeChild(i),RichTextAnimationBase.prototype._triggerInit.apply(this,arguments),e.appendChild(i)}},_triggerOption:function(t){RichTextAnimationBase.prototype._triggerOption.apply(this,arguments),"transitionDuration"===t.key?this._setElementStyle(this._ui.path,"transition-duration",t.value/this._ui.path.length+"ms"):"bringToFront"===t.key?this._setElementStyle(this._ui.svg,"z-index",t.value?"auto":"-1"):"color"===t.key?this._setElementStyle(this._ui.path,"stroke",t.value):"thickness"===t.key?this._setElementStyle(this._ui.path,"stroke-width",t.value+"px"):"roundedEdges"===t.key&&(this._setElementStyle(this._ui.path,"stroke-linecap",t.value?"round":"square"),this._setElementStyle(this._ui.path,"stroke-linejoin",t.value?"round":"mitter"))}}),t});!function(t,e){t.querySelectorAll(".rich-text-animation[data-rich-text-animation]").forEach(function(t){var n="RichTextAnimation"+t.getAttribute("data-rich-text-animation").replace(/-(\w)/g,function(t,e){return e.toUpperCase()}).replace(/^\w/g,function(t){return t.toUpperCase()});"function"==typeof e[n]&&new e[n](t).observe()})}(document,window);